home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
adult_ed
/
foodbar
/
foodbar.doc
< prev
next >
Wrap
Text File
|
1995-05-02
|
9KB
|
171 lines
FOODBAR.DOC
This program provides a database of nutrients for various foods. It allows you
to use this database to keep track of how much of each nutrient you have
ingested over a period of time, normally one day, so you can compare the amount
with the recommended daily allowance. Or you can use it to plan your meals.
Within limits, you can add foods to the provided data file named FOOD_1 DAT.
The program is menu driven and, except for data entry, all menu selections are
acted on immediately, carriage returns are not entered. Just enter a number
from the main menu and you'll be guided with prompts that take you thru the
particular function until you get back to the main menu again.
When you run the program, it looks for a file named FOOD_1.DAT and loads it if
it's found. Otherwise, you'll have to explicitly load (#7 on the menu) a data
file. If you want FOOD_1.DAT to load automatically, keep it in the same
directory from which you invoke FOODBAR.TOS.
For various functions you'll be asked to enter the food description or search
pattern. The description is the food name but you may search for a part of a
name. You may enter 'broiled' or even 'broi' and get such things as 'chicken,
broiled' and 'halibut, broiled' etc. When asked to enter a pattern to search
for, be aware the program is case sensitive. I've entered all food names in
lower case, and recommend you do the same for consistency. So, always use lower
case for your search pattern.
THE ACCUMULATOR_________________________________________________________
Central to the process of using the program is the accumulator which keeps a
running total of the nutrients. Pick '1' from the main menu and you'll be asked
to enter the name of the food whose nutrients you want to add to the total. Say
you drank a glass of milk at lunch, just enter...milk... at the prompt and you
will be shown a list of all foods that have 'milk' in their name. They will be
displayed 20 at a time (if there are that many) and when you see the one that
applies, enter its number.
Next you'll see a prompt that asks how much of that food you ate. The amount you
enter here will proportion the quantities in the database and add these new
values to the accumulator. This prompt displays 3 values from the database,
quantity, measure and the food name, in that order. Since these values are taken
right from the database the syntax of the prompt will usually seem a bit odd,
but you should be able to determine what's being asked of you. In some cases
the quantity will be displayed in an odd measurement like 6.4 oz., but the name
of the food will contain the implicit unit of measure. So, in this case look
at the entire prompt and it will say something like...5.3 oz. of banana, 1
medium...; 1 medium banana is the implicit unit of measure.
Quantity and measure are meant to be read together even though they appear on
separate rows in the listings. For many foods it seems more convenient to
ignore these two items; it makes more sense to talk about 1 medium banana than
so many ounces of banana. You can recognize such foods in the provided data by
their odd ounce measurement (1 banana is 5.3 oz..) and by the fact that the
intended measure is stated as part of the name (banana, 1 medium). Just
remember to look at the name for this additional info and don't struggle to
figure the ounces.
If you added an incorrect food to the accumulator, you can subtract it by going
thru the process again but using a negative (with the -, minus, sign) of the
quantity your trying to correct. Say, if you entered 2 when asked how many cups
of milk you ate, pick 'Add to accumulator' again, search for the same food again
milk), but this time enter -2 when asked 'How many...'. Of course, you can use
the same trick to make small adjustments too; like if you drank 1 instead of 2
cups of milk you would enter -1 in this case and 1 cup of milk will be
subtracted from the accumulator.
The 'Accumulator submenu' item in the main menu lets you clear (zero) the
accumulator to start a new series of totals. Since the accumulator values are
stored along with the database and since it is not cleared automatically when
the program is run, be sure to zero it when you want a fresh start. You can save
and load the accumulator separately using this submenu; no need to save the
entire database just to save the accumulator. Just remember that the default
accumulator values are the ones attached to the database when it's loaded.
Using the submenu for saving allows more than one person to maintain their own
totals.
DISPLAY/PRINT A FOOD____________________________________________________
You may display the values for a particular food or the current total in the
accumulator by choosing #2 from the main menu. If it's the accumulator you want
to view just hit the return; else enter the name (or a part of a name) of the
food desired and pick the desired food from the list. You will then be asked if
if you want the output to go to the printer or a disk file; the default answer
is no (that's what the [n] stands for), so just hit return if you want the
output to go to the screen.
If you want it to go to the printer, turn on your printer and type in lst:
(note the colon) and press return. If you want it to go to a disk file so you
can edit it, type in a filename and press return; the data will be written to a
disk file. WARNING: this program does not check for existing files of the same
name so be sure the filename you type does not already exist or you will lose
that file, it will be over-written.
ENTER/DELETE FOODS_________________________________________________________
With this minimal version you are allowed to add just a few more foods to the
data file. You're not allowed to delete any foods so keep a copy of the
original FOOD_1.DAT. To receive the full version see the note at the end of
this doc.
When entering new foods, I suggest you enter a space somewhere in the name (at
the end is fine). Spaces count as part of the 30 character limit but chances are
that if you use that many characters, there will be a space in there somewhere.
With a space in the name it becomes easy to list all of the foods by using a
single space as the search pattern.
When entering the values for the nutrients, if you enter a 'non-number' you'll
be warned. In such a case a value of zero will be assigned to that nutrient and
you'll be allowed to continue. If zero is what you intended to enter, just
finish all entries and the food values will be stored normally. If zero is wrong
you'll still have to finish entering all values, but you should to answer <n>o
to '...values correct?' and it will not be added to the database. You can then
reenter that food.
In the data I've provided, I've used the amount of .05 for those nutrients known
to be present in 'trace' amounts since I don't know what the actual amounts are.
The value of .05 is really insignificant but serves as a reminder that there is
something there. For all practical purposes decimal amounts can be ignored.
Depending on where you get the data you enter, some of the nutrients that I've
used will not be listed for some foods. All I can suggest is that you enter zero
for a nutrient that's not given and consider the totals in the accumulator as
minimum values (you're getting AT LEAST that much of a particular nutrient). The
most common source of this data will probably be the labels on food containers.
If you've used the 'Add a food...' selection from the main menu and you have not
saved the changes (even if there was no net change), you'll be warned if you
try to exit the program. Entering data is not a whole lot of fun, so please
remember to save your work.
MISC.______________________________________________________________________
If you happen to select the wrong menu number or if you change your mind and
want to exit a menu, a press or two of the return key should get you back to the
main menu.
I'm pretty sure I have the program well 'error trapped'; I don't want you being
bounced out before you've had a change to save your data. But if you encounter
such a problem, please let me know about it.
You now have the minimal version of this program and if you want one that does
more as well as a larger database, you can send $10 to the address below. Or
you can send $6 a disk and, unless you don't mind budget packaging, a reusable
mailer.
===============================================================================
This program was compiled using OSS Personal Pascal, so portions of it are
COPYRIGHT (c) 1986, 1987 by Optimized Systems Software, Inc. and CCD.
COPYRIGHT (c) 1989 by Alex Fetesoff. This program is shareware and as such
may be distributed freely but not for profit. With such distribution must be
included the above documentation and this paragraph. I disclaim any warranties,
expressed or implied, including any warranties of merchantability, performance,
and suitability for any purpose with respect to this software and documentation.
But I hope you like it anyway!
If you have questions or comments, send email to...
DELPHI: alexf
GENIE: alex.f
CompuServe: 72277,1607.
UUCP: ...ames!pacbell!sactoh0!alexf
Hard mail to:
Alex Fetesoff
P.O. Box 163681
Sacramento, CA 95816